//
//  ShopViewController.swift
//  二次源
//
//  Created by 李建文 on 2016/10/17.
//  Copyright © 2016年 二次源. All rights reserved.
//

import UIKit

class ShopViewController: UIViewController {
    
    @IBOutlet weak var GoodArea: UIView!

    @IBOutlet weak var Back: UIButton!
    
    var temp:String?
    
    //赞的数量
    @IBOutlet weak var prase: UILabel!
   
    
    @IBOutlet weak var image: UIImageView!
    
    @IBOutlet weak var phone: UILabel!
    
    @IBOutlet weak var name: UILabel!
    
    @IBOutlet weak var address: UILabel!
    
    @IBOutlet weak var info: UITextView!
    
    
    
    override func viewDidLoad() {
        super.viewDidLoad()
        GoodArea.layer.masksToBounds = true
        GoodArea.layer.cornerRadius = 20
        self.temp = self.navigationController?.title!
        print("接受值")
        print(temp)
        if(temp=="0"){
            self.image.image = UIImage(named: "shop1")
            self.address.text = "大连市甘井子区回收站A"
            self.prase.text = "1503"
        }else if(temp=="1"){
            self.image.image = UIImage(named: "shop2")
            self.address.text = "大连市甘井子区回收站B"
            self.prase.text = "7219"
        }else if(temp=="2"){
            self.image.image = UIImage(named: "shop3")
            self.address.text = "大连市甘井子区回收站C"
            self.prase.text = "5533"
        }else if(temp=="3"){
            self.image.image = UIImage(named: "shop1")
            self.address.text = "大连市甘井子区回收站A"
        }
    }

    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    @IBAction func didBack(_ sender: AnyObject) {
        self.presentingViewController!.dismiss(animated: true, completion: nil)
    }

    

}
